package com.yunke.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 社群DTO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(name = "YunkeCommunityDto", description = "社群DTO")
public class YunkeCommunityDto {

    @Schema(description = "社群ID")
    private Long id;

    @NotBlank(message = "社群名称不能为空")
    @Size(max = 50, message = "社群名称长度不能超过50个字符")
    @Schema(description = "社群名称", required = true)
    private String communityName;

    @Size(max = 500, message = "社群描述长度不能超过500个字符")
    @Schema(description = "社群描述")
    private String description;

    @Schema(description = "社群头像")
    private String avatar;

    @Schema(description = "社群背景图")
    private String backgroundImage;

    @NotNull(message = "社群类型不能为空")
    @Schema(description = "社群类型（1公开 2私密 3付费）", required = true)
    private Integer communityType;

    @Schema(description = "社群标签")
    private String tags;

    @Schema(description = "社群分类ID")
    private Long categoryId;

    @Schema(description = "社群地区")
    private String region;

    @Schema(description = "社群位置")
    private String location;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "加入条件（1自由加入 2申请加入 3邀请加入）")
    private Integer joinCondition = 1;

    @Schema(description = "入群费用")
    private BigDecimal joinFee;

    @Schema(description = "最大成员数")
    private Integer maxMembers = 500;

    @Size(max = 1000, message = "社群公告长度不能超过1000个字符")
    @Schema(description = "社群公告")
    private String announcement;

    @Size(max = 2000, message = "社群规则长度不能超过2000个字符")
    @Schema(description = "社群规则")
    private String rules;

    @Schema(description = "是否允许邀请好友（0否 1是）")
    private Boolean allowInvite = true;

    @Schema(description = "是否开启全员禁言（0否 1是）")
    private Boolean muteAll = false;

    @Schema(description = "是否显示成员列表（0否 1是）")
    private Boolean showMembers = true;

    @Schema(description = "是否允许群内搜索（0否 1是）")
    private Boolean allowSearch = true;

    @Schema(description = "备注")
    private String remark;
} 